var i = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), t = require("../../../uv-ui-tools/libs/mixin/mixin.js"), e = require("./props.js"), r = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js"), require("../../../uv-ui-tools/libs/function/throttle.js");

var n = {
    mixins: [ i.mpMixin, t.mixin, e.props ],
    emits: [ "backspace", "change" ],
    data: function() {
        return {
            backspace: "backspace",
            dot: ".",
            timer: null,
            cardX: "X"
        };
    },
    computed: {
        numList: function() {
            return this.dotDisabled && "number" == this.mode ? this.random ? this.$uv.randomArray([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ]) : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ] : this.dotDisabled || "number" != this.mode ? "card" == this.mode ? this.random ? this.$uv.randomArray([ 1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0 ]) : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0 ] : void 0 : this.random ? this.$uv.randomArray([ 1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0 ]) : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0 ];
        },
        itemStyle: function() {
            var i = this;
            return function(t) {
                var e = {};
                return "number" == i.mode && i.dotDisabled && 9 == t && (e.width = "464rpx"), e;
            };
        },
        btnBgGray: function() {
            var i = this;
            return function(t) {
                return !i.random && 9 == t && ("number" != i.mode || "number" == i.mode && !i.dotDisabled);
            };
        }
    },
    created: function() {},
    methods: {
        backspaceClick: function() {
            var i = this;
            this.$emit("backspace"), clearInterval(this.timer), this.timer = null, this.timer = setInterval(function() {
                i.$emit("backspace");
            }, 250);
        },
        clearTimer: function() {
            clearInterval(this.timer), this.timer = null;
        },
        keyboardClick: function(i) {
            this.dotDisabled || i == this.dot || i == this.cardX || (i = Number(i)), this.$emit("change", i);
        }
    }
};

Array || r.resolveComponent("uv-icon")(), Math;

var o = r._export_sfc(n, [ [ "render", function(i, t, e, n, o, s) {
    return {
        a: r.f(s.numList, function(i, t, e) {
            return {
                a: r.t(i),
                b: r.s(s.itemStyle(t)),
                c: r.o(function(t) {
                    return s.keyboardClick(i);
                }, t),
                d: t
            };
        }),
        b: r.p({
            name: "backspace",
            color: "#303133",
            size: "28"
        }),
        c: r.o(function() {
            return s.backspaceClick && s.backspaceClick.apply(s, arguments);
        }),
        d: r.o(function() {
            return s.clearTimer && s.clearTimer.apply(s, arguments);
        }),
        e: r.o(function() {
            return i.noop && i.noop.apply(i, arguments);
        })
    };
} ], [ "__scopeId", "data-v-f0b77ce2" ] ]);

wx.createComponent(o);